#include "stdafx.h"
#include "VentGenome.h"
#include <cmath>
const double VentUpperBound = 1;
const double VentLowerBound = 0;
const Boundaries VentGenome::_VentBound(VentLowerBound,VentUpperBound);
VentGenome::VentGenome()
{
}
VentGenome:: VentGenome(const unsigned int &num)
:GenomeType(num)
{
}
VentGenome::VentGenome(const double &pre):
GenomeType( digits(_VentBound.upperBound(),
		_VentBound.lowerBound()
		, pre))
{	
}
VentGenome::VentGenome(const VentGenome &rhs):
GenomeType(rhs.length())
{
}
VentGenome& VentGenome::operator=(const VentGenome &rhs)
{
	if ( this != &rhs )
		length(rhs.length());
	return (*this);
}
VentGenome::~VentGenome()
{
}
double VentGenome::upper() const
{
	return _VentBound.upperBound();
}
double VentGenome::lower() const
{
	return _VentBound.lowerBound();
}
double VentGenome::precision() const
{
	return (
        accuracy( _VentBound.upperBound(),
		_VentBound.lowerBound(),
		length())
		);
}
unsigned int VentGenome::precision(const double &acc)
{
	return digits(_VentBound.upperBound(),
		_VentBound.lowerBound(),
		acc);
}